package cn.edu.scau.cmi.chenbingquan.composite.consistent;

import java.util.ArrayList;

// 一致组合模式父类
public abstract class ConsistentComponent {
	public String name;
	public ArrayList<ConsistentComponent> children = new ArrayList<>();
	
	// 获取名字
	public abstract String getName();
	
	// 增加节点
	public abstract void addChild(ConsistentComponent child);
	
	// 删除节点
	public abstract void removeChild(ConsistentComponent child);
	
	// 获取子节点数组
	public abstract ArrayList<ConsistentComponent> getChildren();
}
